//
//  LGHospitalPlanTimeView.m
//  HeartDiseaseManage
//
//  Created by 1234 on 2023/5/25.
//  入院日期

#import "LGHospitalPlanTimeView.h"

@interface LGHospitalPlanTimeView()

/**   */
@property (nonatomic , strong)UIButton *titleBtn;
/**   */
@property (nonatomic , strong)UILabel *dateLabel;
/**   */
@property (nonatomic , strong)UIImageView *tipView;

@end

@implementation LGHospitalPlanTimeView

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self createSubView];
    }
    return self;
}


-(void)createSubView{
    [self addSubview:self.titleBtn];
    [self addSubview:self.dateLabel];
    [self addSubview:self.tipView];
    [self addSubview:self.actionBtn];
    [self.dateLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self.tipView.mas_left);
        make.centerY.equalTo(self);
    }];
    [self.tipView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self).offset(-viewPix(12));
        make.centerY.equalTo(self);
        make.width.height.equalTo(@(16));
    }];
}
-(UIButton *)titleBtn{
    if(!_titleBtn){
        _titleBtn = [UIButton buttonWithTitle:@"安排入院日期" titleFont:LGFontWeight(16, UIFontWeightMedium) textColor:@"#333333" imageName:@"计划入院-日期"];
        _titleBtn.frame = CGRectMake(viewPix(12), 0, viewPix(135), viewPix(56));
    }
    return _titleBtn;
}

-(UILabel *)dateLabel{
    if(!_dateLabel){
        _dateLabel = [UILabel lableWithText:@"" colorString:@"#000000" textFont:LGFont(16) textAlignment:NSTextAlignmentRight lines:1];
    }
    return _dateLabel;
}

-(UIImageView *)tipView{
    if(!_tipView){
        _tipView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"grayTip16"]];
    }
    return _tipView;
}

-(UIButton *)actionBtn{
    if(!_actionBtn){
        _actionBtn = [UIButton buttonWithType:UIButtonTypeCustom];
        _actionBtn.frame = CGRectMake(0, 0, Screen_W, viewPix(56));
    }
    return _actionBtn;
}

@end
